﻿namespace RuoVea.Swms.Server.Models;

/// <summary>
/// 出库记录
/// </summary>
[SugarTable(nameof(WmsStockOut), "出库记录")]
public class WmsStockOut : EntityBase
{
    /// <summary>
    /// 产品编码
    /// </summary>
    [SugarColumn(ColumnDescription = "产品编码", IsNullable = false, Length = 20)]
    public long ProductId { get; set; }

    /// <summary>
    /// 出库日期
    /// </summary>
    [SugarColumn(ColumnDescription = "出库日期", IsNullable = false)]
    public DateTime OutDate { get; set; }

    /// <summary>
    /// 出库数量
    /// </summary>
    [SugarColumn(ColumnDescription = "出库数量", IsNullable = false)]
    public int Quantity { get; set; }

    /// <summary>
    /// 操作人
    /// </summary>
    [SugarColumn(ColumnDescription = "操作人", IsNullable = false, Length = 50)]
    public string Operator { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnDescription = "备注", IsNullable = true)]
    public string Remark { get; set; }

    /// <summary>
    /// 产品信息（导航属性）
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ProductId))]
    public WmsProduct Product { get; set; }
}
